home *** CD-ROM | disk | FTP | other *** search
- function setWindowInterfacePos()
- {
- faktor1 = Stage.width / bg_mc._width;
- faktor2 = Stage.height / bg_mc._height;
- if(faktor1 > faktor2)
- {
- ratio = faktor1;
- }
- else
- {
- ratio = faktor2;
- }
- bg_mc._width *= ratio;
- bg_mc._height *= ratio;
- size_mc._x = Math.round(Stage.width - 14);
- size_mc._y = Math.round(Stage.height - 14);
- application_border_mc._width = Stage.width - 1;
- application_border_mc._height = Stage.height - 1;
- if(!live_mode)
- {
- dragbar_mc._width = Stage.width;
- }
- tools_mc._x = Stage.width - 53;
- html_fs_btn._x = Stage.width - 26;
- }
- function setPos()
- {
- stage_width = Stage.width;
- stage_height = Stage.height;
- content_pos_mc.tab_navigation_mc.tab_navigation_bg_mc._visible = true;
- if(_root.useFSP_path == "false")
- {
- var _loc2_ = 25;
- }
- else
- {
- application_title_op._visible = true;
- if(stage_height > minimum_stage_height)
- {
- _loc2_ = 49;
- }
- else if(live_mode)
- {
- _loc2_ = 49;
- }
- else
- {
- _loc2_ = 25;
- }
- }
- if(live_mode)
- {
- content_bg_width = Number(livemode_width);
- content_bg_height = Number(livemode_height);
- content_pos_mc.content_bg_mc._y = -25;
- }
- else if(fullscreen)
- {
- content_bg_width = stage_width;
- content_bg_height = stage_height;
- content_pos_mc.content_bg_mc._y = 0;
- }
- else
- {
- content_bg_width = stage_width;
- content_bg_height = stage_height;
- if(video_mode && full_video_mode_display == "true")
- {
- content_pos_mc.content_bg_mc._y = 0;
- }
- else
- {
- content_pos_mc.content_bg_mc._y = 25;
- }
- if(stage_width > Number(default_stage_width))
- {
- content_bg_width = Number(default_stage_width);
- }
- if(stage_height > Number(default_stage_height))
- {
- content_bg_height = Number(default_stage_height);
- }
- if(stage_width < Number(minimum_stage_width))
- {
- content_bg_width = Number(minimum_stage_width);
- }
- if(stage_height < Number(minimum_stage_height))
- {
- content_bg_height = Number(minimum_stage_height);
- }
- }
- content_pos_mc.content_bg_mc._width = content_bg_width;
- if(fullscreen)
- {
- content_pos_mc.content_bg_mc._height = content_bg_height;
- }
- else if(live_mode)
- {
- content_pos_mc.content_bg_mc._height = content_bg_height + 2;
- }
- else if(video_mode && full_video_mode_display == "true")
- {
- content_pos_mc.content_bg_mc._height = content_bg_height - _loc2_ + 25;
- }
- else
- {
- content_pos_mc.content_bg_mc._height = content_bg_height - _loc2_;
- }
- content_pos_x = Math.round(stage_width / 2 - content_bg_width / 2);
- if(content_pos_x < 0)
- {
- content_pos_x = 0;
- }
- content_pos_y = Math.round(stage_height / 2 - content_bg_height / 2);
- if(_root.useFSP_path == "false")
- {
- if(content_pos_y < 0)
- {
- content_pos_y = 0;
- }
- }
- else if(fullscreen)
- {
- if(content_pos_y < 0)
- {
- content_pos_y = 0;
- }
- dragbar_mc._height = 23;
- }
- else if(live_mode)
- {
- content_pos_y = 25;
- dragbar_mc._height = 25;
- }
- else
- {
- if(content_pos_y < 24)
- {
- content_pos_y = 24;
- }
- dragbar_mc._height = 23;
- }
- content_pos_mc._x = content_pos_x;
- content_pos_mc._y = content_pos_y;
- content_pos_mc.content_panel_mc._width = content_bg_width - 4;
- if(video_mode)
- {
- if(live_mode)
- {
- content_pos_mc.content_panel_mc._y = 2;
- content_pos_mc.video_mc._y = 2;
- content_pos_mc.content_panel_mc._height = content_bg_height - _loc2_ - 4;
- }
- else if(fullscreen)
- {
- content_pos_mc.content_panel_mc._y = 2;
- content_pos_mc.video_mc._y = 2;
- content_pos_mc.content_panel_mc._height = content_bg_height - 29;
- }
- else if(full_video_mode_display == "true")
- {
- content_pos_mc.content_panel_mc._y = 27;
- content_pos_mc.video_mc._y = 27;
- content_pos_mc.content_panel_mc._height = content_bg_height - 29 - _loc2_;
- }
- else
- {
- content_pos_mc.content_panel_mc._y = 52;
- content_pos_mc.video_mc._y = 52;
- content_pos_mc.content_panel_mc._height = content_bg_height - 54 - _loc2_;
- }
- }
- else
- {
- content_pos_mc.content_panel_mc._y = 27;
- content_pos_mc.content_panel_mc._height = content_bg_height - 61 - _loc2_;
- }
- if(saved_panel_width != content_pos_mc.content_panel_mc._width or saved_panel_height != content_pos_mc.content_panel_mc._height)
- {
- if(saved_stage_width != Stage.width or saved_stage_height != Stage.height)
- {
- setpos_changelog++;
- }
- content_pos_mc.content_panel_mc.broadcastMessage("onCustomResize");
- }
- saved_stage_width = Stage.width;
- saved_stage_height = Stage.height;
- saved_panel_width = content_pos_mc.content_panel_mc._width;
- saved_panel_height = content_pos_mc.content_panel_mc._height;
- content_pos_mc.bottom_mc.bottom_bg_mc._width = content_pos_mc.content_panel_mc._width;
- content_pos_mc.bottom_mc._x = 2;
- content_pos_mc.bottom_mc._y = content_pos_mc.content_panel_mc._y + content_pos_mc.content_panel_mc._height + 2;
- content_pos_mc.bottom_mc.logo_bottom_holder_mc._x = content_pos_mc.bottom_mc.bottom_bg_mc._width - content_pos_mc.bottom_mc.logo_bottom_holder_mc._width - 10;
- content_pos_mc.bottom_mc.logo_bottom_holder_mc._y = Math.round(content_pos_mc.bottom_mc.bottom_bg_mc._height / 2 - content_pos_mc.bottom_mc.logo_bottom_holder_mc._height / 2) - 3;
- if(special_pos_mc.inlay_video_mc)
- {
- special_pos_mc.inlay_video_mc.setLocalPos();
- inlay_video_mc_x = Math.round(Stage.width / 2 - special_pos_mc.inlay_video_mc._width / 2);
- inlay_video_mc_y = Math.round(Stage.height / 2 - special_pos_mc.inlay_video_mc._height / 2);
- if(inlay_video_mc_x <= 0)
- {
- inlay_video_mc_x = 0;
- }
- if(_root.useFSP_path == "true")
- {
- if(inlay_video_mc_y < 24)
- {
- inlay_video_mc_y = 24;
- }
- }
- else if(inlay_video_mc_y <= 0)
- {
- inlay_video_mc_y = 0;
- }
- special_pos_mc.inlay_video_mc._x = inlay_video_mc_x;
- special_pos_mc.inlay_video_mc._y = inlay_video_mc_y;
- }
- }
- function maximizeApplication()
- {
- if(maximized)
- {
- tools_mc.gotoAndStop(1);
- if(client_os == "Windows")
- {
- mdm.Forms.MainForm.restore();
- }
- else
- {
- mdm.Forms.MainForm.showFullScreen(false);
- }
- application_border_mc._visible = true;
- maximized = false;
- size_mc._visible = true;
- if(saved_premaximize_width == undefined || saved_premaximize_width == client_res_x)
- {
- mdm.Forms.MainForm.width = client_res_x - 20;
- mdm.Forms.MainForm.height = client_res_y - 20 - mac_margin;
- mdm.Forms.MainForm.x = Math.round(client_res_x / 2 - mdm.Forms.MainForm.width / 2);
- mdm.Forms.MainForm.y = Math.round(client_res_y / 2 - mdm.Forms.MainForm.height / 2);
- }
- }
- else
- {
- tools_mc.gotoAndStop(2);
- application_border_mc._visible = false;
- saved_premaximize_width = mdm.Forms.MainForm.width;
- saved_premaximize_height = mdm.Forms.MainForm.height;
- if(client_os == "Windows")
- {
- mdm.Forms.MainForm.maximize();
- }
- else
- {
- mdm.Forms.MainForm.showFullScreen(true);
- }
- maximized = true;
- size_mc._visible = false;
- }
- setPos();
- }
- function minimizeApplication()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.MainForm.minimize();
- }
- else if(maximized)
- {
- maximizeApplication();
- macminimize_delay = setTimeout(macMinimize,250);
- }
- else
- {
- macMinimize();
- }
- }
- function macMinimize()
- {
- mdm.Forms.MainForm.minimize();
- }
- function openApplication()
- {
- if(_root.useFSP_path != "true")
- {
- activateHtmlFsbtn();
- }
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Opening..","");
- }
- if(saved_app_resolution_x)
- {
- var _loc3_ = saved_app_resolution_x;
- }
- else
- {
- _loc3_ = client_res_x;
- }
- if(saved_app_resolution_y)
- {
- var _loc2_ = saved_app_resolution_y;
- }
- else
- {
- _loc2_ = client_res_y - mac_margin;
- }
- if(_loc3_ > client_res_x)
- {
- _loc3_ = client_res_x;
- }
- if(_loc2_ > client_res_y)
- {
- _loc2_ = client_res_y - mac_margin;
- }
- if(_loc3_ == client_res_x && _loc2_ == client_res_y)
- {
- mdm.Forms.MainForm.width = client_res_x - 20;
- mdm.Forms.MainForm.height = client_res_y - 20 - mac_margin;
- main_form_x = Math.round(client_res_x / 2 - mdm.Forms.MainForm.width / 2);
- main_form_y = Math.round(client_res_y / 2 - mdm.Forms.MainForm.height / 2);
- if(main_form_x <= 0)
- {
- main_form_x = 0;
- }
- if(main_form_y <= 0)
- {
- main_form_y = 0;
- }
- mdm.Forms.MainForm.x = main_form_x;
- mdm.Forms.MainForm.y = main_form_y;
- maximizeApplication();
- }
- else
- {
- mdm.Forms.MainForm.width = _loc3_;
- mdm.Forms.MainForm.height = _loc2_;
- main_form_x = Math.round(client_res_x / 2 - _loc3_ / 2);
- main_form_y = Math.round(client_res_y / 2 - _loc2_ / 2);
- if(main_form_x <= 0)
- {
- main_form_x = 0;
- }
- if(main_form_y <= 0)
- {
- main_form_y = 0;
- }
- mdm.Forms.MainForm.x = main_form_x;
- mdm.Forms.MainForm.y = main_form_y;
- }
- setPos();
- mdm.Forms.MainForm.visible = true;
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Initialising","");
- }
- mdm.Forms.SplashForm.close();
- clearInterval(main_timeout);
- main_timeout = setTimeout(renderMain,250);
- }
- function renderExit()
- {
- v2b_system_so.data.resultion = [mdm.Forms.MainForm.width,mdm.Forms.MainForm.height];
- killInlayVideo();
- content_pos_mc._visible = false;
- dragbar_mc._visible = false;
- tools_mc._visible = false;
- size_mc._visible = false;
- application_title_op._visible = false;
- bg_mc._alpha = 35;
- special_pos_mc._x = 0;
- special_pos_mc._y = 0;
- special_pos_mc.attachMovie("exit_mc","exit_mc",1);
- content_pos_mc.content_mc.removeMovieClip();
- content_pos_mc.video_mc.flv_player.pause();
- }
- function renderMCT(__file)
- {
- destroyBacktoVideoButton();
- video_mode = true;
- mct_mode = true;
- content_pos_mc.bottom_mc._visible = false;
- if(full_video_mode_display == "true")
- {
- content_pos_mc.tab_navigation_mc._visible = false;
- }
- i = 0;
- while(i < used_tab_arr.length)
- {
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].tab_navigation_item_active_mc._visible = false;
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].enabled = true;
- if(used_tab_arr[i][2])
- {
- content_pos_mc.content_mc[used_tab_arr[i][1]]._visible = false;
- }
- i++;
- }
- mct_info = __file;
- content_pos_mc.mct_mc.createEmptyMovieClip("mct_holder_mc",1);
- loadClip(fsp_path + folder + mct_core,content_pos_mc.mct_mc.mct_holder_mc,null,null,false,false,false,false,true,true,null);
- setPos();
- }
- function killMCT()
- {
- mct_mode = false;
- video_mode = false;
- content_pos_mc.mct_mc.mct_holder_mc.removeMovieClip();
- mct_info = undefined;
- content_pos_mc.tab_navigation_mc._visible = true;
- renderContent(last_visible_content);
- content_pos_mc.bottom_mc._visible = true;
- setPos();
- }
- function notifyDebugger(arg)
- {
- if(debug == "true")
- {
- debug_mc_attached.debug_op.text += "\n" + arg;
- }
- }
- function printOverview()
- {
- my_print = new PrintJob();
- var _loc2_ = my_print.start();
- i = 1;
- while(i <= p_num)
- {
- my_print.addPage("overview_mc_print" + i,null,{printAsBitmap:false},1);
- i++;
- }
- my_print.send();
- delete my_print;
- }
- function f1Handler()
- {
- triggerHandler(_root.targetF1);
- }
- function lostHandler()
- {
- triggerHandler(_root.targetLOST);
- }
- function triggerHandler(arg)
- {
- i = 0;
- while(i < used_tab_arr.length)
- {
- if(String(content_pos_mc.tab_navigation_mc["tab_item_mc" + i].text_op.text.toLowerCase()) == String(arg.toLowerCase()))
- {
- renderContent(i);
- break;
- }
- i++;
- }
- }
-